package com.yuwubao.uav.tool.mapper;

import com.yuwubao.framework.bean.PageData;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 *
 */
@Mapper
public interface UserMapper {

    int getPublishIntegration(PageData pageData) throws Exception;
    void addUserPublishIntegration(PageData pageData) throws Exception;

    void checkUserPublish(PageData pageData) throws Exception;
    void addUserPublish(PageData pageData) throws Exception;

    void deleteUserBrowsingHistoryType(PageData pageData) throws Exception;
    void updateUserBrowsingHistoryType(PageData pageData) throws Exception;
    void updateUserBrowsingHistoryTypeName(PageData pageData) throws Exception;
    void addUserBrowsingHistoryType(PageData pageData) throws Exception;

    int getAdviceEnrollCount(PageData pageData) throws Exception;
    void userAdviceEnroll(PageData pageData) throws Exception;

    List<PageData> listUserBrowsingTypeHistory(PageData pageData) throws Exception;

    List<PageData> listUserPublishForAdmin(PageData pageData) throws Exception;
    int listUserPublishForAdminCount(PageData pd) throws Exception;

    List<PageData> listMyPublish(PageData pageData) throws Exception;
    int listMyPublishCount(PageData pd) throws Exception;

    List<PageData> listUserBrowsingHistory(PageData pageData) throws Exception;
    int listUserBrowsingHistoryCount(PageData pd) throws Exception;
    List<PageData> listUserCollection(PageData pageData) throws Exception;
    int listUserCollectionCount(PageData pd) throws Exception;
    List<PageData> listUserIntegration(PageData pageData) throws Exception;
    int listUserIntegrationCount(PageData pd) throws Exception;
    int getUserIntegrationCount(PageData pd) throws Exception;
    List<PageData> listUserPublish(PageData pageData) throws Exception;
    int listUserPublishCount(PageData pd) throws Exception;
    PageData getUserBrowsingHistory(PageData pageData) throws Exception;
    void deleteUserBrowsingHistory(PageData pageData) throws Exception;

    int checkRoleIsUsing(PageData pageData) throws Exception;
    List<PageData> listPrivilegeForRole(PageData pageData) throws Exception;
    List<PageData> listUserPrivilege(PageData pageData) throws Exception;
    List<PageData> listUserRole(PageData pageData) throws Exception;
    List<PageData> listFrontUserRole(PageData pageData) throws Exception;
    void deleteRolePrivilege(PageData pageData) throws Exception;
    void addRolePrivilege(PageData pageData) throws Exception;


    void deleteRole(PageData pageData) throws Exception;
    void updateRole(PageData pageData) throws Exception;
    void addRole(PageData pageData) throws Exception;
    List<PageData> listRole(PageData pageData) throws Exception;
    int listRoleCount(PageData pageData) throws Exception;
    List<PageData> listOrganization(PageData pageData) throws Exception;
    int listOrganizationCount(PageData pageData) throws Exception;


    void deletePrivilege(PageData pageData) throws Exception;
    void deleteRolePrivilegeRelation(PageData pageData) throws Exception;
    void updatePrivilege(PageData pageData) throws Exception;
    void addPrivilege(PageData pageData) throws Exception;
    List<PageData> listPrivilege(PageData pageData) throws Exception;
    int listPrivilegeCount(PageData pageData) throws Exception;

    void updateUserPwd(PageData pageData) throws Exception;
    void addUserRole(PageData pageData) throws Exception;

    int userLogin(PageData pageData) throws Exception;
    PageData getUserInfo(PageData pageData) throws Exception;

    void disableOrEnableUser(PageData pageData) throws Exception;

    void deleteUserResearchField(PageData pageData) throws Exception;
    void deleteUserRole(PageData pageData) throws Exception;
    void deleteUser(PageData pageData) throws Exception;

    List<PageData> listFrontUser(PageData pageData) throws Exception;
    int listFrontUserCount(PageData pageData) throws Exception;
    List<PageData> listBackendUser(PageData pageData) throws Exception;
    int listBackendUserCount(PageData pageData) throws Exception;
    void addUserResearchField(PageData pageData) throws Exception;
    void addUser(PageData pageData) throws Exception;
    int findByUserName(@Param("userId") String userId) throws Exception;
    int getUserByUserName(PageData pageData) throws Exception;
    int getUserByMail(PageData pageData) throws Exception;
    String getUserPwdById(PageData pageData) throws Exception;
    void changePwd(PageData pageData) throws Exception;

    int getCId(PageData pageData) throws Exception;
    void addCompany(PageData pageData) throws Exception;

    int getDId(PageData pageData) throws Exception;
    void addDepartment(PageData pageData) throws Exception;

    void addAddressList(PageData pageData) throws Exception;
    int getAddressByTel(PageData pageData) throws Exception;

    List<PageData> listAddressListCompany() throws Exception;
    List<PageData> listAddressListDepartment(PageData pageData) throws Exception;
    List<PageData> listAddressList(PageData pageData) throws Exception;

    void deleteAddressList(PageData pageData) throws Exception;

    void deleteAddressListCompanyByCompanyId(PageData pageData) throws Exception;
    void deleteAddressListDepartmentByCompanyId(PageData pageData) throws Exception;
    void deleteCompanyAddressListByCompanyId(PageData pageData) throws Exception;

    void deleteAddressListDepartmentById(PageData pageData) throws Exception;
    void deleteAddressListByDepartmentId(PageData pageData) throws Exception;

}
